package a.f.d.a;

import a.c.e;
import a.c.k;
import a.c.n;
import a.c.v;
import a.c.w;
import a.f.rc;

import java.util.*;

public class o
  implements zb
{
  private static final String a = "y.layout.hierarchic.incremental.ConstraintIncrementalLayerer.ORIG_EDGES";
  private static final int b = 2;
  private e c;
  private e d;
  private a.c.bb e;
  private a.c.x f = null;
  public static final String g = "y.layout.hierarchic.incremental.ConstraintIncrementalLayerer.EDGE_WEIGHTS_DPKEY";
  private ArrayList h;
  private e[] i;
  private final zb j;
  private k k;
  private HashMap l;
  private boolean m;
  private a.f.o n;
  private n o;
  private n p;
  private a.c.x q;
  private a.c.x r;
  private a.c.x s;
  private k t;
  private int u;
  private a.c.ab v;
  private a.c.ab w;
  private a.c.x x;
  private a.c.ab y;
  private boolean z = false;
  public static boolean A;
  
  public o(zb paramzb)
  {
    this.j = paramzb;
  }
  
  public boolean a()
  {
    return this.z;
  }
  
  public void a(boolean paramBoolean)
  {
    this.z = paramBoolean;
  }
  
  a.c.x b()
  {
    return this.f;
  }
  
  void a(a.c.x paramx)
  {
    this.f = paramx;
  }
  
  public void a(a.f.o paramo, ac paramac, bc parambc)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    if (!bool2) {}
    int i1 = paramac.a() == 0 ? 1 : 0;
    ArrayList localArrayList = new ArrayList(64);
    if (i1 != 0)
    {
      localObject1 = a.i.db.a();
      localObject2 = paramo.v();
      label146:
      label152:
      do
      {
        if (!((w)localObject2).e()) {
          break;
        }
        localObject3 = ((w)localObject2).d();
        if (bool1) {
          break label253;
        }
        if (this.f != null)
        {
          if (bool2) {
            break label146;
          }
          if (this.f.getBool(localObject3)) {}
        }
        else
        {
          localArrayList.add(localObject3);
          ((a.c.x)localObject1).a(localObject3, true);
          if (bool2) {
            continue;
          }
          if (!bool1) {
            break label152;
          }
        }
        ((a.c.x)localObject1).a(localObject3, false);
        ((w)localObject2).f();
      } while (!bool1);
    }
    Object localObject1 = paramo.c(d.K);
    if (localObject1 != null)
    {
      localObject2 = paramo.v();
      do
      {
        if (!((w)localObject2).e()) {
          break;
        }
        localObject3 = ((w)localObject2).d();
        if (bool1) {
          break label253;
        }
        if (!bool2)
        {
          if (((k)localObject1).getBool(localObject3)) {
            localArrayList.add(localObject3);
          }
          ((w)localObject2).f();
        }
      } while (!bool1);
    }
    return;
    label253:
    Object localObject2 = paramo.c(xb.a);
    if (!bool2)
    {
      if (localObject2 != null)
      {
        if (bool2) {
          break label296;
        }
        this.k = ((k)((k)localObject2).get(paramo));
      }
    }
    else {
      if (!bool1) {
        break label295;
      }
    }
    this.k = null;
    label295:
    label296:
    if (!bool2) {}
    this.m = (!b(paramo));
    this.n = new a.f.q();
    this.t = paramo.c("y.layout.hierarchic.incremental.ConstraintIncrementalLayerer.EDGE_WEIGHTS_DPKEY");
    this.s = a.i.db.a();
    this.q = this.n.B();
    this.u = 0;
    this.o = this.n.C();
    this.p = this.n.C();
    Object localObject3 = new e[paramac.a()];
    int i2 = paramac.a() + localArrayList.size() + 2;
    int i3 = i2;
    int i4 = 0;
    Object localObject6;
    label556:
    label558:
    do
    {
      if (i4 >= localObject3.length) {
        break;
      }
      if (bool1) {
        break label631;
      }
      localObject4 = this.n.i();
      localObject3[i4] = localObject4;
      int i5 = 0;
      localObject6 = paramac.a(i4).c().f();
      if (localObject6 != null) {}
      Object localObject7;
      while (bool2)
      {
        localObject7 = (e)((v)localObject6).c();
        i5 += ((e)localObject7).d();
        this.s.a(localObject7, localObject4);
        localObject6 = ((v)localObject6).a();
        if (bool2) {
          break label558;
        }
        if (bool1) {
          break label556;
        }
        if (!bool1) {
          break;
        }
      }
      this.q.a(localObject4, paramac.a(i4).c());
      if (!bool2)
      {
        if (i4 > 0)
        {
          localObject6 = localObject3[(i4 - 1)];
          localObject7 = this.n.a((e)localObject6, (e)localObject4);
          this.p.a(localObject7, 2);
          this.o.a(localObject7, i5);
          i3 = Math.max(i3, i5);
        }
        i4++;
      }
    } while (!bool1);
    label631:
    k localk = paramo.c(rc.a);
    this.l = new HashMap();
    if (localk != null)
    {
      localObject4 = paramo.v();
      do
      {
        if (!((w)localObject4).e()) {
          break;
        }
        localObject5 = ((w)localObject4).d();
        if ((!bool2) && (bool1)) {
          break label838;
        }
        if (!bool2) {}
        localObject6 = localk.get(localObject5) != null ? localk.get(localObject5) : localObject5;
        this.l.put(localObject6, localObject5);
        ((w)localObject4).f();
      } while (!bool1);
    }
    Object localObject4 = paramo.v();
    do
    {
      if (!((w)localObject4).e()) {
        break;
      }
      localObject5 = ((w)localObject4).d();
      this.l.put(localObject5, localObject5);
      ((w)localObject4).f();
      if (bool2) {
        break label831;
      }
      if (bool1) {
        break label822;
      }
    } while (!bool1);
    if (!bool2) {
      this.y = new a.c.ab();
    }
    label822:
    label831:
    if ((bool2) || ((!this.m) || (this.t != null))) {
      label838:
      c(paramo);
    }
    localObject4 = new a.i.y(paramo);
    if (!bool2)
    {
      if (this.f != null)
      {
        localObject5 = paramo.v();
        do
        {
          if (!((w)localObject5).e()) {
            break;
          }
          localObject6 = ((w)localObject5).d();
          if (bool1) {
            break label940;
          }
          if (this.f.getBool(localObject6)) {
            ((a.i.y)localObject4).a((e)localObject6);
          }
          ((w)localObject5).f();
        } while (!bool1);
      }
      if (bool2) {}
    }
    else
    {
      if (this.m)
      {
        label940:
        if (bool2) {
          break label1034;
        }
        if (this.t == null)
        {
          if (!bool2) {
            if (!localArrayList.isEmpty())
            {
              if (!bool2) {
                if (i1 == 0) {
                  break label996;
                }
              }
            }
            else
            {
              c(paramo, paramac, parambc);
              if (bool2) {
                break label1018;
              }
            }
          }
          if (bool1)
          {
            label996:
            localObject5 = new xc();
            ((xc)localObject5).a(paramo, paramac, parambc);
          }
          ((a.i.y)localObject4).g();
          label1018:
          return;
        }
      }
      b(paramo, (k)localObject1);
      this.x = a.i.db.a();
    }
    label1034:
    a(paramo);
    Object localObject5 = a.i.db.a();
    b(paramo, (a.c.x)localObject5, this.f);
    if (!bool2)
    {
      if (a(paramo, (a.c.x)localObject5, this.f))
      {
        a((a.c.x)localObject5, this.y);
        b(paramo, (a.c.x)localObject5, this.f);
      }
      a(paramo, (a.c.x)localObject5);
    }
    int i6 = 0;
    int i7 = 0;
    if (i7 < localObject3.length) {}
    e locale;
    int i8;
    while (bool2)
    {
      locale = ((a.c.bb)this.q.get(localObject3[i7])).m();
      i8 = ((a.c.x)localObject5).getInt(locale);
      if (i8 > i6)
      {
        paramac.a((byte)0, i6);
        i6++;
      }
      for (;;)
      {
        if (!bool2) {
          if (!bool1)
          {
            if (!bool1) {
              break;
            }
            i7++;
            if (bool2) {
              continue;
            }
            i6++;
          }
        }
      }
      if (!bool1) {
        break;
      }
    }
    Iterator localIterator = localArrayList.iterator();
    if (localIterator.hasNext()) {}
    label1316:
    label1318:
    do
    {
      locale = (e)localIterator.next();
      if ((!bool2) && (bool1)) {
        return;
      }
      i8 = ((a.c.x)localObject5).getInt(locale);
      if (i8 >= paramac.a()) {}
      while (bool2)
      {
        paramac.a((byte)0, paramac.a());
        if (bool2) {
          break label1318;
        }
        if (bool1) {
          break label1316;
        }
        if (!bool1) {
          break;
        }
      }
      paramac.a(i8).a(locale);
      if (!bool1) {
        break;
      }
      ((a.i.y)localObject4).g();
    } while (bool2);
    this.l.clear();
  }
  
  private void a(a.f.o paramo, a.c.x paramx)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    k localk = paramo.c(kc.b);
    if ((bool2) || (this.h != null)) {
      if (!bool2)
      {
        if (this.i != null) {
          if (bool2) {
            break label58;
          }
        }
      }
      else {
        if (this.i.length >= 2) {
          break label57;
        }
      }
    }
    return;
    label57:
    label58:
    Iterator localIterator = this.h.iterator();
    do
    {
      do
      {
        if (!localIterator.hasNext()) {
          break;
        }
        localObject1 = (a.c.d)localIterator.next();
      } while (!this.n.j((a.c.d)localObject1));
      this.n.a((a.c.d)localObject1);
    } while ((!bool2) && (!bool2) && (!bool1));
    int i1 = 1;
    if (i1 < this.i.length - 1) {}
    while (bool2)
    {
      if (bool1) {
        break label175;
      }
      this.n.a(this.i[i1]);
      i1++;
      if (!bool1) {
        break;
      }
    }
    label175:
    a.c.bb[] arrayOfbb = a.a.m.a(this.n);
    Object localObject1 = new a.c.bb[arrayOfbb.length];
    int i2 = 0;
    e locale1;
    label293:
    do
    {
      do
      {
        if (i2 >= arrayOfbb.length) {
          break;
        }
        a.c.bb localbb1 = arrayOfbb[i2];
        localObject1[i2] = new a.c.bb();
        localObject2 = localbb1.l();
        do
        {
          do
          {
            if (!((w)localObject2).e()) {
              break label293;
            }
            locale1 = ((w)localObject2).d();
            a.c.bb localbb2 = (a.c.bb)this.q.get(locale1);
            if (bool1) {
              break;
            }
            if (localbb2 != null) {
              localObject1[i2].addAll(localbb2);
            }
            ((w)localObject2).f();
          } while (!bool1);
          i2++;
        } while (bool2);
      } while (!bool1);
    } while (bool2);
    int[] arrayOfInt = new int[this.i.length - 1];
    int i3 = 0;
    do
    {
      do
      {
        if (i3 >= arrayOfInt.length) {
          break;
        }
        arrayOfInt[i3] = 2147483647;
        i3++;
        if ((!bool2) && (bool1)) {
          break label366;
        }
      } while (!bool1);
    } while (bool2);
    i3 = 0;
    label366:
    Object localObject2 = paramo.v();
    do
    {
      if (!((w)localObject2).e()) {
        break;
      }
      locale1 = ((w)localObject2).d();
      i5 = paramx.getInt(locale1);
      i3 = Math.max(i3, i5);
      if (bool2) {
        break label538;
      }
      if (bool1) {
        break label534;
      }
      Object localObject3 = (bool2) || (localk != null) ? (jc)localk.get(locale1) : null;
      if (!bool2)
      {
        if ((localObject3 != null) && ((bool2) || (localObject3.c() != null)))
        {
          if (bool2) {
            continue;
          }
          if (localObject3.c().a() >= 0) {
            arrayOfInt[localObject3.c().a()] = Math.min(arrayOfInt[localObject3.c().a()], i5);
          }
        }
        ((w)localObject2).f();
      }
    } while (!bool1);
    if (!bool2) {
      arrayOfInt[0] = 0;
    }
    label534:
    label538:
    localObject2 = new int[i3 + 1];
    int i4 = -1;
    int i5 = 0;
    int i6 = 0;
    label630:
    label634:
    do
    {
      do
      {
        if (i6 >= arrayOfInt.length) {
          break;
        }
        int i7 = arrayOfInt[i6];
        if (bool2) {
          break label653;
        }
        if (bool1) {
          break label652;
        }
        if (i7 != 2147483647)
        {
          int i8 = i4 + 1;
          do
          {
            do
            {
              if (i8 >= i7) {
                break;
              }
              localObject2[i8] = i5;
              i8++;
              if (bool2) {
                break label634;
              }
              if (bool1) {
                break label630;
              }
            } while (!bool1);
          } while (bool2);
          i5 = i6;
          i4 = i7 - 1;
        }
        i6++;
      } while (!bool1);
    } while (bool2);
    label652:
    label653:
    i6 = i4 + 1;
    do
    {
      do
      {
        if (i6 >= localObject2.length) {
          break;
        }
        localObject2[i6] = i5;
        i6++;
        if (bool2) {
          break label698;
        }
        if (bool1) {
          break label696;
        }
      } while (!bool1);
    } while (bool2);
    i6 = 0;
    label696:
    label698:
    label841:
    label846:
    do
    {
      if (i6 >= localObject1.length) {
        break;
      }
      Object localObject4 = localObject1[i6];
      if ((bool2) || (localObject4.size() != 0))
      {
        w localw1 = localObject4.l();
        int i9 = paramx.getInt(localw1.d());
        int i10 = localObject2[i9];
        do
        {
          do
          {
            if (!localw1.e()) {
              break;
            }
            i11 = paramx.getInt(localw1.d());
            int i12 = localObject2[i11];
            if (bool2) {
              break label846;
            }
            if (bool1) {
              break label841;
            }
            if (i12 != i10) {
              break label916;
            }
            i9 = Math.min(i9, i11);
            localw1.f();
          } while (!bool1);
        } while (bool2);
        int i11 = i9 - arrayOfInt[i10];
        if (i11 > 0)
        {
          w localw2 = localObject4.l();
          do
          {
            if (!localw2.e()) {
              break;
            }
            e locale2 = localw2.d();
            paramx.a(locale2, paramx.getInt(locale2) - i11);
            localw2.f();
            if (bool2) {
              break label926;
            }
            if (bool1) {
              break label924;
            }
          } while (!bool1);
        }
      }
      if (!bool2) {
        i6++;
      }
    } while (!bool1);
    label916:
    label924:
    label926:
    return;
  }
  
  private boolean a(a.f.o paramo, a.c.x paramx1, a.c.x paramx2)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    if ((bool2) || (this.z)) {
      return false;
    }
    a.c.m localm = paramo.w();
    label128:
    do
    {
      do
      {
        if (!localm.e()) {
          break;
        }
        a.c.d locald = localm.a();
        if (!bool2) {
          if (paramx2 != null)
          {
            if (bool2) {
              continue;
            }
            if (paramx2.getBool(locald.e())) {
              break label128;
            }
            if (bool2) {
              continue;
            }
            if (paramx2.getBool(locald.f())) {
              break label128;
            }
          }
        }
        if (!bool2)
        {
          if (paramx1.getInt(locald.e()) == paramx1.getInt(locald.f())) {
            return true;
          }
          localm.f();
        }
      } while (!bool1);
    } while (bool2);
    return false;
  }
  
  private void a(a.c.x paramx, a.c.ab paramab)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    a.c.bb localbb = new a.c.bb();
    HashMap localHashMap1 = new HashMap();
    HashMap localHashMap2 = new HashMap();
    Object localObject1 = this.e.l();
    e locale1;
    e locale2;
    do
    {
      do
      {
        if (!((w)localObject1).e()) {
          break;
        }
        localObject2 = ((w)localObject1).d();
        localObject3 = ((e)localObject2).o();
        locale1 = ((w)localObject3).d();
        ((w)localObject3).f();
        locale2 = ((w)localObject3).d();
        localHashMap1.put(localObject2, locale1);
        localHashMap2.put(localObject2, locale2);
        ((w)localObject1).f();
        if (bool2) {
          break label159;
        }
        if (bool1) {
          break label152;
        }
      } while (!bool1);
    } while (bool2);
    localObject1 = this.e.l();
    label152:
    label159:
    do
    {
      if (!((w)localObject1).e()) {
        break;
      }
      localObject2 = ((w)localObject1).d();
      this.n.a((e)localObject2);
      ((w)localObject1).f();
    } while (!bool1);
    localObject1 = new HashSet(this.h);
    Object localObject2 = this.e.l();
    int i1;
    label445:
    label505:
    do
    {
      if (!((w)localObject2).e()) {
        break;
      }
      localObject3 = ((w)localObject2).d();
      locale1 = (e)localHashMap1.get(localObject3);
      locale2 = (e)localHashMap2.get(localObject3);
      i1 = paramx.getInt(((a.c.bb)this.q.get(locale1)).m());
      if (bool1) {
        break label677;
      }
      int i2 = paramx.getInt(((a.c.bb)this.q.get(locale2)).m());
      if (locale1 != locale2)
      {
        if (!bool2) {
          if (i1 == i2)
          {
            localbb.add(localObject3);
            if (bool2) {
              continue;
            }
            if (!bool1) {
              break label658;
            }
          }
        }
        a.c.d locald1;
        if (i1 < i2)
        {
          locald1 = locale1.a(locale2);
          if (!bool2) {
            if (locald1 != null)
            {
              if (bool2) {
                break label505;
              }
              if (!((HashSet)localObject1).contains(locald1)) {
                break label445;
              }
            }
          }
          locald1 = this.n.a(locale1, locale2);
          this.p.a(locald1, 2 * (i2 - i1));
          this.o.a(locald1, 1);
          if (bool2) {
            continue;
          }
          if (bool1)
          {
            this.p.a(locald1, Math.max(this.p.getInt(locald1), 2 * (i2 - i1)));
            this.o.a(locald1, Math.max(this.o.getInt(locald1), 1));
            if (bool2) {
              continue;
            }
            if (!bool1) {}
          }
        }
        else
        {
          locald1 = locale1.b(locale2);
          if (!bool2) {
            if (locald1 != null)
            {
              if (bool2) {
                break label592;
              }
              if (!((HashSet)localObject1).contains(locald1)) {
                break label600;
              }
            }
          }
          locald1 = this.n.a(locale2, locale1);
          this.p.a(locald1, 2 * (i1 - i2));
          this.o.a(locald1, 1);
          if (bool2) {
            continue;
          }
          if (bool1)
          {
            this.p.a(locald1, Math.max(this.p.getInt(locald1), 2 * (i2 - i1)));
            this.o.a(locald1, Math.max(this.o.getInt(locald1), 1));
          }
        }
      }
      ((w)localObject2).f();
    } while (!bool1);
    label592:
    label600:
    localObject2 = this.n.B();
    label658:
    label677:
    a.a.x.a(a.a.x.a(this.n), (a.c.x)localObject2);
    Object localObject3 = localbb.l();
    label860:
    label888:
    do
    {
      if (!((w)localObject3).e()) {
        break;
      }
      locale1 = ((w)localObject3).d();
      locale2 = (e)localHashMap1.get(locale1);
      i1 = ((a.c.x)localObject2).getInt(locale2);
      e locale3 = (e)localHashMap2.get(locale1);
      int i3 = ((a.c.x)localObject2).getInt(locale3);
      if ((!bool2) && (bool1)) {
        return;
      }
      a.c.d locald2;
      if (i1 <= i3)
      {
        locald2 = locale2.a(locale3);
        if (!bool2) {
          if (locald2 != null)
          {
            if (bool2) {
              break label888;
            }
            if (!((HashSet)localObject1).contains(locald2)) {
              break label860;
            }
          }
        }
        locald2 = this.n.a(locale2, locale3);
        this.p.a(locald2, 2);
        this.o.a(locald2, 1);
        if (bool2) {
          continue;
        }
        if (bool1)
        {
          this.p.a(locald2, Math.max(this.p.getInt(locald2), 2));
          if (bool2) {
            continue;
          }
          if (!bool1) {}
        }
      }
      else
      {
        locald2 = locale2.b(locale3);
        if (!bool2) {
          if (locald2 != null)
          {
            if (bool2) {
              break label969;
            }
            if (!((HashSet)localObject1).contains(locald2)) {
              break label977;
            }
          }
        }
        locald2 = this.n.a(locale3, locale2);
        this.p.a(locald2, 2);
        this.o.a(locald2, 1);
        if (bool2) {
          continue;
        }
        if (bool1) {
          this.p.a(locald2, Math.max(this.p.getInt(locald2), 2));
        }
      }
      ((w)localObject3).f();
    } while (!bool1);
    label969:
    label977:
    if (!bool2) {
      this.n.a((a.c.x)localObject2);
    }
  }
  
  static void a(a.c.q paramq, k paramk)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    if (l.a(paramq)) {
      return;
    }
    if ((bool2) || (paramk == null)) {
      paramk = a.i.q.a(new Integer(1));
    }
    n localn = a.i.db.b();
    Object localObject1 = paramq.w();
    Object localObject2;
    do
    {
      if (!((a.c.m)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.m)localObject1).a();
      localn.a(localObject2, paramk.getInt(localObject2));
      ((a.c.m)localObject1).f();
    } while (!bool1);
    localObject1 = new a.c.ab();
    Object localObject3;
    label217:
    do
    {
      for (;;)
      {
        if (!(localObject2 = f.a(paramq, true)).isEmpty())
        {
          a.c.d locald2;
          int i3;
          do
          {
            if (((a.c.ab)localObject2).size() == 1)
            {
              a.c.d locald1 = ((a.c.ab)localObject2).m();
              ((a.c.ab)localObject1).add(locald1);
              paramq.a(locald1);
              if ((!bool2) && (!bool1)) {
                break;
              }
            }
            int i1 = 2147483647;
            localObject3 = ((a.c.ab)localObject2).l();
            do
            {
              do
              {
                if (!((a.c.m)localObject3).e()) {
                  break label217;
                }
                int i2 = localn.getInt(((a.c.m)localObject3).a());
                if (bool1) {
                  break;
                }
                if (i2 < i1) {
                  i1 = i2;
                }
                ((a.c.m)localObject3).f();
              } while (!bool1);
            } while (bool2);
            localObject3 = ((a.c.ab)localObject2).l();
            if (!((a.c.m)localObject3).e()) {
              break;
            }
            if (bool2) {
              break label342;
            }
            locald2 = ((a.c.m)localObject3).a();
            i3 = localn.getInt(locald2) - i1;
            localn.a(locald2, i3);
          } while (bool2);
          if (bool1) {
            break label338;
          }
          if (!bool1)
          {
            if (i3 == 0)
            {
              ((a.c.ab)localObject1).add(locald2);
              paramq.a(locald2);
            }
            ((a.c.m)localObject3).f();
            if (!bool1) {
              break;
            }
          }
        }
      }
    } while (bool2);
    ((a.c.ab)localObject1).a(new c_(paramk));
    label338:
    label342:
    a.c.m localm = ((a.c.ab)localObject1).l();
    do
    {
      if (!localm.e()) {
        break;
      }
      localObject3 = localm.a();
      paramq.d((a.c.d)localObject3);
      if (!bool2)
      {
        if (!l.a(paramq)) {
          paramq.a((a.c.d)localObject3);
        }
        localm.f();
      }
    } while (!bool1);
  }
  
  private void a(a.f.o paramo)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    k localk = paramo.c(kc.b);
    this.e = new a.c.bb();
    this.u += 10;
    a.c.m localm = this.w.l();
    a.c.d locald;
    do
    {
      do
      {
        if (!localm.e()) {
          break;
        }
        locald = localm.a();
        this.u += a(locald);
        localm.f();
        if (bool2) {
          break label120;
        }
        if (bool1) {
          break label114;
        }
      } while (!bool1);
    } while (bool2);
    localm = this.v.l();
    label114:
    label120:
    do
    {
      do
      {
        if (!localm.e()) {
          break;
        }
        locald = localm.a();
        this.u += a(locald);
        localm.f();
        if (bool2) {
          break label186;
        }
        if (bool1) {
          break label180;
        }
      } while (!bool1);
    } while (bool2);
    localm = this.w.l();
    label180:
    label186:
    do
    {
      do
      {
        if (!localm.e()) {
          break;
        }
        locald = localm.a();
        a(locald, localk);
        localm.f();
        if (bool2) {
          break label244;
        }
        if (bool1) {
          break label238;
        }
      } while (!bool1);
    } while (bool2);
    localm = this.v.l();
    label238:
    label244:
    do
    {
      if (!localm.e()) {
        break;
      }
      locald = localm.a();
      a(locald, localk);
      localm.f();
    } while (!bool1);
  }
  
  private void a(a.c.d paramd, k paramk)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    e locale1 = (e)this.s.get(paramd.e());
    e locale2 = (e)this.s.get(paramd.f());
    if (locale1 == locale2) {
      return;
    }
    if (!bool2) {}
    jc localjc1 = paramk == null ? null : (jc)paramk.get(paramd.e());
    if (!bool2) {}
    jc localjc2 = paramk == null ? null : (jc)paramk.get(paramd.f());
    if (((bool2) || (localjc1 != null)) && ((bool2) || (localjc2 != null)))
    {
      if (bool2) {
        break label248;
      }
      if (localjc1.c().a() != localjc2.c().a())
      {
        a.c.d locald;
        if (localjc1.c().a() > localjc2.c().a())
        {
          locald = this.n.a(locale2, locale1);
          if (bool2) {
            break label210;
          }
          if (!bool1) {}
        }
        else
        {
          locald = this.n.a(locale1, locale2);
        }
        label210:
        i2 = a(paramd);
        this.o.a(locald, i2);
        this.p.a(locald, 2);
        return;
      }
    }
    label248:
    int i1 = this.r.getInt(locale1);
    int i2 = this.r.getInt(locale2);
    if (!bool2)
    {
      if (i1 < i2)
      {
        a(locale1, locale2, paramd, false);
        if ((!bool2) && (!bool1)) {
          return;
        }
      }
      if (bool2) {}
    }
    else
    {
      if (i1 != i2) {
        break label325;
      }
      if (bool2) {
        break label331;
      }
      a(locale1, locale2, paramd, true);
    }
    if (bool1) {
      label325:
      label331:
      a(locale2, locale1, paramd, false);
    }
  }
  
  private int a(a.c.d paramd)
  {
    return this.t == null ? 1 : Math.max(0, this.t.getInt(paramd));
  }
  
  private void a(e parame1, e parame2, a.c.d paramd, boolean paramBoolean)
  {
    boolean bool = d.R;
    e locale = this.n.i();
    this.e.add(locale);
    this.x.a(locale, paramd);
    a.c.d locald1 = this.n.a(locale, parame1);
    this.o.a(locald1, this.u);
    this.p.a(locald1, 0);
    a.c.d locald2 = this.n.a(locale, parame2);
    int i1 = a(paramd);
    if (!bool) {}
    this.o.a(locald2, paramBoolean ? this.u : i1);
    if (!bool) {}
    this.p.a(locald2, paramBoolean ? 0 : 2);
  }
  
  private void b(a.c.q paramq, k paramk)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    this.r = this.n.B();
    this.v = new a.c.ab();
    this.w = new a.c.ab();
    a.c.ab localab1 = new a.c.ab();
    a.c.ab localab2 = new a.c.ab();
    a.i.y localy = new a.i.y(this.n);
    if (!bool2)
    {
      if (this.c != null) {
        localy.a(this.c.l());
      }
      if (bool2) {}
    }
    else if (this.d != null)
    {
      localy.a(this.d.l());
    }
    a.c.x localx = this.n.B();
    a.a.m.a(this.n, localx);
    n localn = a.i.db.b();
    int i1 = paramq.m() + 1;
    Object localObject1 = this.n.w();
    do
    {
      if (!((a.c.m)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.m)localObject1).a();
      if (!bool2)
      {
        if (bool1) {
          break label217;
        }
        localn.a(localObject2, i1);
        ((a.c.m)localObject1).f();
      }
    } while (!bool1);
    label217:
    localObject1 = a.i.db.b();
    this.n.a("y.layout.hierarchic.incremental.ConstraintIncrementalLayerer.ORIG_EDGES", (k)localObject1);
    Object localObject2 = paramq.w();
    e locale;
    label459:
    do
    {
      if (!((a.c.m)localObject2).e()) {
        break;
      }
      a.c.d locald1 = ((a.c.m)localObject2).a();
      if (!bool2)
      {
        if (bool1) {
          break label485;
        }
        if (bool2) {}
      }
      else if (!paramk.getBool(locald1.e()))
      {
        if (bool2) {
          continue;
        }
        if (!paramk.getBool(locald1.f())) {
          break label459;
        }
      }
      locale = (e)this.s.get(locald1.e());
      localObject3 = (e)this.s.get(locald1.f());
      if (!bool2)
      {
        if (locale != localObject3)
        {
          int i4 = localx.getInt(locale);
          int i5 = localx.getInt(localObject3);
          a.c.d locald3 = this.n.a(locale, (e)localObject3);
          ((n)localObject1).a(locald3, locald1);
          localn.a(locald3, 1);
          localab2.add(locald3);
          if (!bool2) {
            if (i4 != i5)
            {
              this.v.add(locald1);
              if (bool2) {
                continue;
              }
              if (!bool1) {
                break label459;
              }
            }
          }
          this.w.add(locald1);
        }
        ((a.c.m)localObject2).f();
      }
    } while (!bool1);
    if (!bool2) {
      a(this.n, localn);
    }
    label485:
    localObject2 = a.a.m.a(this.n);
    int i2 = 0;
    do
    {
      if (i2 >= localObject2.length) {
        break;
      }
      locale = localObject2[i2].m();
      if (!bool2)
      {
        if (locale != this.c) {
          this.n.a(this.c, locale);
        }
        i2++;
      }
    } while (!bool1);
    bd localbd = new bd(this.j);
    int i3 = localbd.a(this.n, this.r, localab1);
    paramq.j("y.layout.hierarchic.incremental.ConstraintIncrementalLayerer.ORIG_EDGES");
    Object localObject3 = localab1.l();
    a.c.d locald2;
    do
    {
      do
      {
        if (!((a.c.m)localObject3).e()) {
          break;
        }
        locald2 = ((a.c.m)localObject3).a();
        this.n.e(locald2);
        ((a.c.m)localObject3).f();
        if (bool2) {
          break label661;
        }
        if (bool1) {
          break label654;
        }
      } while (!bool1);
    } while (bool2);
    localObject3 = localab2.l();
    label654:
    label661:
    do
    {
      if (!((a.c.m)localObject3).e()) {
        break;
      }
      locald2 = ((a.c.m)localObject3).a();
      if (bool2) {
        return;
      }
      if (bool1) {
        break label790;
      }
      if (!bool2)
      {
        if (this.n.j(locald2)) {
          this.n.a(locald2);
        }
        ((a.c.m)localObject3).f();
      }
    } while (!bool1);
    localy.g();
    if (!bool2)
    {
      if (!bool2)
      {
        if (this.c != null) {
          this.r.a(this.c, -1);
        }
        if (bool2) {}
      }
      else if (this.d != null)
      {
        this.r.a(this.d, i3 + 1);
      }
      label790:
      this.n.a(localx);
    }
  }
  
  private int b(a.f.o paramo, a.c.x paramx1, a.c.x paramx2)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    a.c.x localx1 = this.n.B();
    a.c.x localx2 = paramo.B();
    a.c.x localx3 = this.n.B();
    int i1 = a.a.m.a(this.n, localx3);
    a.i.z localz = new a.i.z(this.n, localx3);
    int i2 = 0;
    if (i2 < i1)
    {
      localz.c(new Integer(i2));
      a.a.db.a(this.n, localx1, this.o, this.p);
      if (bool2) {}
    }
    else
    {
      label256:
      label281:
      do
      {
        if (bool1) {
          break label326;
        }
        w localw1 = this.n.v();
        do
        {
          if (!localw1.e()) {
            break;
          }
          e locale1 = localw1.d();
          int i3 = localx1.getInt(locale1);
          a.c.bb localbb = (a.c.bb)this.q.get(locale1);
          do
          {
            if (bool1) {
              break label281;
            }
            if ((bool2) || (localbb != null))
            {
              w localw2 = localbb.l();
              do
              {
                if (!localw2.e()) {
                  break label256;
                }
                e locale2 = localw2.d();
                if (bool1) {
                  break;
                }
                if (paramx2 != null)
                {
                  if (bool2) {
                    continue;
                  }
                  if (paramx2.getBool(locale2)) {}
                }
                else
                {
                  localx2.a(locale2, i3);
                }
                localw2.f();
              } while (!bool1);
            }
            localw1.f();
          } while (bool2);
        } while (!bool1);
        if (!bool2) {
          i2++;
        }
        if (!bool1) {
          break;
        }
        i2 = new a.f.d.ab().a(paramo, localx2, paramx1);
        paramo.a(localx2);
        this.n.a(localx1);
      } while (bool2);
      label326:
      this.n.a(localx3);
      localz.g();
    }
    return i2;
  }
  
  private int c(a.f.o paramo, ac paramac, bc parambc)
  {
    if (!d.R)
    {
      if ((this.j instanceof dc))
      {
        this.j.a(paramo, paramac, parambc);
        return paramac.a();
      }
      new dc(this.j).a(paramo, paramac, parambc);
    }
    return paramac.a();
  }
  
  protected void c()
  {
    if (!l.a(this.n)) {
      throw new IllegalArgumentException("Circular constraints detected");
    }
  }
  
  private boolean b(a.f.o paramo)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    if (kc.d(paramo) != null) {
      return true;
    }
    if (!bool2) {
      if (this.k == null) {
        return false;
      }
    }
    k localk = paramo.c(rc.a);
    w localw = paramo.v();
    do
    {
      do
      {
        if (!localw.e()) {
          break;
        }
        e locale1 = localw.d();
        if ((bool2) || (localk != null)) {
          if (bool2) {}
        }
        e locale2 = localk.get(locale1) != null ? localk.get(locale1) : locale1;
        a.c.z localz = (a.c.z)this.k.get(locale2);
        if (!bool2)
        {
          if (localz != null) {
            return true;
          }
          localw.f();
        }
      } while (!bool1);
    } while (bool2);
    return false;
  }
  
  private boolean a(e parame1, e parame2)
  {
    boolean bool = d.R;
    a.c.ab localab = a.a.bb.a(this.n, parame1, parame2, true);
    if (!bool)
    {
      if (localab != null)
      {
        if (bool) {
          break label51;
        }
        if (!localab.isEmpty()) {
          return true;
        }
      }
      localab = a.a.bb.a(this.n, parame2, parame1, true);
    }
    label51:
    if ((bool) || (localab != null))
    {
      if (bool) {
        break label74;
      }
      if (!localab.isEmpty()) {
        return true;
      }
    }
    label74:
    return false;
  }
  
  private void c(a.f.o paramo)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    k localk1 = paramo.c(rc.a);
    this.c = this.n.i();
    this.q.a(this.c, new a.c.bb());
    this.d = this.n.i();
    this.q.a(this.d, new a.c.bb());
    this.h = new ArrayList();
    kc localkc = kc.d(paramo);
    this.i = null;
    if (!bool2)
    {
      if ((localkc != null) && ((bool2) || (localkc.e().size() > 1)))
      {
        i1 = localkc.e().size();
        this.i = new e[i1 + 1];
        this.i[0] = this.c;
        this.i[i1] = this.d;
        int i2 = 1;
        if (i2 < i1) {
          this.i[i2] = this.n.i();
        }
        label266:
        label283:
        while (bool2)
        {
          if (bool1) {
            break label314;
          }
          localObject2 = this.n.a(this.i[(i2 - 1)], this.i[i2]);
          if (!bool2)
          {
            if (i2 == 1) {
              this.p.a(localObject2, 1);
            }
          }
          else
          {
            if (bool2) {
              break label283;
            }
            if (!bool1) {
              break label266;
            }
          }
          this.p.a(localObject2, 2);
          this.o.a(localObject2, 0);
          i2++;
          if (!bool1) {
            break;
          }
        }
        label314:
        localObject1 = this.n.a(this.i[(i1 - 1)], this.i[i1]);
        this.p.a(localObject1, 1);
        this.o.a(localObject1, 0);
        if (!bool2) {
          if (!bool1) {
            break label436;
          }
        }
      }
      else
      {
        this.i = new e[2];
        this.i[0] = this.c;
        this.i[1] = this.d;
      }
    }
    else
    {
      localObject1 = this.n.a(this.i[0], this.i[1]);
      this.h.add(localObject1);
      this.p.a(localObject1, 0);
      this.o.a(localObject1, 0);
    }
    int i1 = 1;
    label436:
    Object localObject1 = new a.c.z();
    Object localObject2 = new a.c.z();
    k localk2 = paramo.c(kc.b);
    Object localObject3 = paramo.v();
    Object localObject4;
    Object localObject5;
    Object localObject6;
    Object localObject7;
    label638:
    Object localObject8;
    label691:
    label732:
    label757:
    Object localObject9;
    Object localObject10;
    Object localObject11;
    label1226:
    label1356:
    label1617:
    label1879:
    label1893:
    label1895:
    label1900:
    label2156:
    label2158:
    do
    {
      if (!((w)localObject3).e()) {
        break;
      }
      e locale1 = ((w)localObject3).d();
      localObject4 = a(locale1);
      localObject5 = null;
      if (bool1) {
        break label2565;
      }
      if ((localk2 != null) && ((bool2) || (localk2.get(locale1) != null)))
      {
        localObject5 = (jc)localk2.get(locale1);
        if ((bool2) || (!((jc)localObject5).b()))
        {
          localObject6 = ((jc)localObject5).c();
          if (((bool2) || (localObject6 != null)) && (((pc)localObject6).a() >= 0))
          {
            localObject7 = this.n.a(this.i[localObject6.a()], (e)localObject4);
            if (!bool2) {
              if (((pc)localObject6).a() == 0)
              {
                i4 = 0;
                this.h.add(localObject7);
                if (bool2) {
                  break label691;
                }
                if (!bool1) {
                  break label638;
                }
              }
            }
            int i4 = 1;
            this.p.a(localObject7, i4);
            this.o.a(localObject7, 0);
            localObject7 = this.n.a((e)localObject4, this.i[(localObject6.a() + 1)]);
            if (!bool2) {
              if (((pc)localObject6).a() == this.i.length - 2)
              {
                i4 = 0;
                this.h.add(localObject7);
                if (bool2) {
                  break label757;
                }
                if (!bool1) {
                  break label732;
                }
              }
            }
            i4 = 1;
            this.p.a(localObject7, i4);
            this.o.a(localObject7, 0);
          }
        }
      }
      else
      {
        localObject6 = this.n.a(this.c, (e)localObject4);
        this.p.a(localObject6, 0);
        this.o.a(localObject6, 0);
        this.h.add(localObject6);
        localObject6 = this.n.a((e)localObject4, this.d);
        this.p.a(localObject6, 0);
        this.o.a(localObject6, 0);
        this.h.add(localObject6);
      }
      localObject6 = null;
      localObject7 = null;
      if ((bool2) || (localk1 != null)) {
        if (bool2) {}
      }
      localObject8 = localk1.get(locale1) != null ? localk1.get(locale1) : locale1;
      if ((bool2) || (this.k != null))
      {
        localObject9 = (a.c.z)this.k.get(localObject8);
        if ((bool2) || (localObject9 != null))
        {
          localObject10 = ((a.c.z)localObject9).h();
          Object localObject12;
          e locale2;
          do
          {
            if (!((a.c.y)localObject10).e()) {
              break label1617;
            }
            localObject11 = ((a.c.y)localObject10).j();
            if (bool1) {
              break;
            }
            if ((localObject11 instanceof fb))
            {
              localObject12 = (fb)localObject11;
              locale2 = (e)this.l.get(((fb)localObject12).d());
              if (bool2) {
                continue;
              }
              Object localObject13;
              int i6;
              int i5;
              switch (((fb)localObject12).c())
              {
              case 0: 
                localObject13 = (bool2) || (localk2 != null) ? (jc)localk2.get(locale2) : null;
                i6 = ((!bool2) && (localObject5 == null)) || ((!bool2) && (localObject13 == null)) || (((jc)localObject5).c() == localObject13.c()) ? 1 : 0;
                if (bool2) {
                  continue;
                }
                if (i6 != 0)
                {
                  ((a.c.z)localObject1).add(new b_(locale1, (fb)localObject12));
                  if (bool2) {
                    continue;
                  }
                  if (!bool1) {
                    break;
                  }
                }
                break;
              case -1: 
                localObject13 = (bool2) || (localk2 != null) ? (jc)localk2.get(locale2) : null;
                if (((bool2) || (localObject5 != null)) && ((bool2) || (localObject13 != null))) {
                  if (bool2) {
                    break label1226;
                  }
                }
                i6 = ((jc)localObject5).c().a() >= localObject13.c().a() ? 1 : 0;
                if (bool2) {
                  continue;
                }
                if (i6 != 0)
                {
                  ((a.c.z)localObject2).add(new b_(locale1, (fb)localObject12));
                  this.u += ((fb)localObject12).b();
                  if (bool2) {
                    continue;
                  }
                  if (!bool1) {
                    break;
                  }
                }
                break;
              case 1: 
                localObject13 = (bool2) || (localk2 != null) ? (jc)localk2.get(locale2) : null;
                if (((bool2) || (localObject5 != null)) && ((bool2) || (localObject13 != null))) {
                  if (bool2) {
                    break label1356;
                  }
                }
                i6 = ((jc)localObject5).c().a() <= localObject13.c().a() ? 1 : 0;
                if (bool2) {
                  continue;
                }
                if (i6 != 0)
                {
                  ((a.c.z)localObject2).add(new b_(locale1, (fb)localObject12));
                  this.u += ((fb)localObject12).b();
                  if (bool2) {
                    continue;
                  }
                  if (!bool1) {
                    break;
                  }
                }
                break;
              case 2: 
                if ((bool2) || (localObject5 != null)) {
                  if (bool2) {
                    break label1440;
                  }
                }
                i5 = ((jc)localObject5).c().a() == 0 ? 1 : 0;
                if (bool2) {
                  continue;
                }
                if (i5 != 0)
                {
                  if (!bool2) {
                    if (localObject6 == null)
                    {
                      localObject6 = localObject12;
                      if (bool2) {
                        continue;
                      }
                      if (!bool1) {
                        break;
                      }
                    }
                  }
                  if (bool2) {
                    continue;
                  }
                  if (((fb)localObject6).a() < ((fb)localObject12).a())
                  {
                    localObject6 = localObject12;
                    if (bool2) {
                      continue;
                    }
                    if (!bool1) {
                      break;
                    }
                  }
                }
                break;
              case -2: 
                if ((bool2) || (localObject5 != null)) {
                  if (bool2) {
                    break label1543;
                  }
                }
                i5 = ((jc)localObject5).c().a() == i1 - 1 ? 1 : 0;
                if (bool2) {
                  continue;
                }
                if (i5 != 0)
                {
                  if (!bool2) {
                    if (localObject7 == null)
                    {
                      localObject7 = localObject12;
                      if (bool2) {
                        continue;
                      }
                      if (!bool1) {
                        break;
                      }
                    }
                  }
                  if (bool2) {
                    continue;
                  }
                  if (((fb)localObject7).a() < ((fb)localObject12).a()) {
                    localObject7 = localObject12;
                  }
                }
                break;
              }
            }
            ((a.c.y)localObject10).f();
          } while (!bool1);
          localObject10 = (a.c.bb)this.q.get(localObject4);
          if (bool2) {
            break label2565;
          }
          if (!bool2) {
            if (localObject6 != null)
            {
              if (bool2) {
                break label1900;
              }
              if (localObject7 != null)
              {
                if (!bool2) {
                  if (((fb)localObject6).a() > ((fb)localObject7).a())
                  {
                    localObject11 = (a.c.bb)this.q.get(this.c);
                    if ((!bool2) && (localObject10 == null)) {
                      break label1879;
                    }
                    localObject12 = ((a.c.bb)localObject10).l();
                    do
                    {
                      if (!((w)localObject12).e()) {
                        break;
                      }
                      locale2 = ((w)localObject12).d();
                      ((a.c.bb)localObject11).add(locale2);
                      this.s.a(locale2, this.c);
                      ((w)localObject12).f();
                      if (bool2) {
                        break label1895;
                      }
                      if (bool1) {
                        break label1893;
                      }
                    } while (!bool1);
                  }
                }
                localObject11 = (a.c.bb)this.q.get(this.d);
                if (bool2) {
                  break label2163;
                }
                if ((bool2) || (localObject10 != null))
                {
                  localObject12 = ((a.c.bb)localObject10).l();
                  do
                  {
                    if (!((w)localObject12).e()) {
                      break;
                    }
                    locale2 = ((w)localObject12).d();
                    ((a.c.bb)localObject11).add(locale2);
                    this.s.a(locale2, this.d);
                    ((w)localObject12).f();
                    if (bool2) {
                      break label1895;
                    }
                    if (bool1) {
                      break label1893;
                    }
                  } while (!bool1);
                }
                if (bool2) {
                  break label2146;
                }
                this.n.a((e)localObject4);
                if (!bool1) {
                  break label2149;
                }
              }
            }
          }
          if (!bool2) {
            if (localObject6 != null)
            {
              localObject11 = (a.c.bb)this.q.get(this.c);
              if ((bool2) || (localObject10 != null))
              {
                localObject12 = ((a.c.bb)localObject10).l();
                do
                {
                  if (!((w)localObject12).e()) {
                    break;
                  }
                  locale2 = ((w)localObject12).d();
                  ((a.c.bb)localObject11).add(locale2);
                  this.s.a(locale2, this.c);
                  ((w)localObject12).f();
                  if (bool2) {
                    break label2023;
                  }
                  if (bool1) {
                    break label2021;
                  }
                } while (!bool1);
              }
              if (bool2) {
                break label2141;
              }
            }
          }
          while (bool2)
          {
            this.n.a((e)localObject4);
            if (!bool1) {
              break;
            }
            if ((!bool2) && (localObject7 == null)) {
              break;
            }
            localObject11 = (a.c.bb)this.q.get(this.d);
            if ((bool2) || (localObject10 != null))
            {
              localObject12 = ((a.c.bb)localObject10).l();
              do
              {
                if (!((w)localObject12).e()) {
                  break;
                }
                locale2 = ((w)localObject12).d();
                ((a.c.bb)localObject11).add(locale2);
                this.s.a(locale2, this.d);
                ((w)localObject12).f();
                if (bool2) {
                  break label2158;
                }
                if (bool1) {
                  break label2156;
                }
              } while (!bool1);
            }
          }
          this.n.a((e)localObject4);
        }
      }
      ((w)localObject3).f();
    } while (!bool1);
    label1440:
    label2021:
    label2023:
    label2163:
    if (!bool2)
    {
      if (bool2) {
        break label2555;
      }
      if (!((a.c.z)localObject2).isEmpty())
      {
        localObject3 = a.i.db.b();
        int i3 = 1;
        localObject4 = ((a.c.z)localObject2).h();
        do
        {
          do
          {
            if (!((a.c.y)localObject4).e()) {
              break;
            }
            localObject5 = (b_)((a.c.y)localObject4).j();
            localObject6 = a(((b_)localObject5).a);
            localObject7 = (e)this.l.get(((b_)localObject5).c.d());
            if (bool2) {
              break label2440;
            }
            localObject8 = a((e)localObject7);
            localObject9 = null;
            if (bool1) {
              break label2439;
            }
            if ((bool2) || ((localObject6 != localObject8) && (localObject8 != null)))
            {
              if (!bool2) {
                if (((b_)localObject5).a() == -1)
                {
                  localObject9 = this.n.a((e)localObject6, (e)localObject8);
                  break label2337;
                }
              }
              if (((b_)localObject5).a() == 1) {
                localObject9 = this.n.a((e)localObject8, (e)localObject6);
              }
              if (localObject9 != null)
              {
                ((n)localObject3).a(localObject9, ((b_)localObject5).c());
                i3 = Math.max(i3, ((b_)localObject5).c());
                this.p.a(localObject9, ((b_)localObject5).c.e() * 2);
                this.o.a(localObject9, ((b_)localObject5).c.b());
              }
            }
            ((a.c.y)localObject4).f();
          } while (!bool1);
        } while (bool2);
        i3 *= (this.n.m() + 1);
        localObject4 = this.n.w();
        do
        {
          if (!((a.c.m)localObject4).e()) {
            break;
          }
          localObject5 = ((a.c.m)localObject4).a();
          if (bool1) {
            break label2526;
          }
          if (((n)localObject3).getInt(localObject5) == 0) {
            ((n)localObject3).a(localObject5, i3);
          }
          ((a.c.m)localObject4).f();
        } while (!bool1);
        if (bool2) {
          return;
        }
        a(this.n, (k)localObject3);
      }
    }
    label1543:
    label2141:
    label2146:
    label2149:
    if (!((a.c.z)localObject1).isEmpty())
    {
      ((a.c.z)localObject1).a(new a_());
      localObject3 = ((a.c.z)localObject1).h();
      label2555:
      label2939:
      label2941:
      do
      {
        if (!((a.c.y)localObject3).e()) {
          break;
        }
        b_ localb_ = (b_)((a.c.y)localObject3).j();
        localObject4 = a(localb_.a);
        do
        {
          localObject5 = (e)this.l.get(localb_.c.d());
          localObject6 = a((e)localObject5);
          if (((!bool2) && (localObject4 == localObject6)) || (localObject6 == null) || (a((e)localObject4, (e)localObject6))) {
            break;
          }
          localObject7 = new a.c.ab(((e)localObject6).n());
          localObject8 = ((a.c.ab)localObject7).l();
          do
          {
            if (!((a.c.m)localObject8).e()) {
              break;
            }
            localObject9 = ((a.c.m)localObject8).a();
            this.n.a((a.c.d)localObject9, (e)localObject4, ((a.c.d)localObject9).f());
            if (bool2) {
              break label2739;
            }
            ((a.c.m)localObject8).f();
            if (bool1) {
              break label2734;
            }
          } while (!bool1);
          if (!bool2) {
            localObject7 = new a.c.ab(((e)localObject6).m());
          }
          localObject8 = ((a.c.ab)localObject7).l();
          do
          {
            if (!((a.c.m)localObject8).e()) {
              break;
            }
            localObject9 = ((a.c.m)localObject8).a();
            this.n.a((a.c.d)localObject9, ((a.c.d)localObject9).e(), (e)localObject4);
            ((a.c.m)localObject8).f();
            if (bool2) {
              break label2972;
            }
            if (bool1) {
              break label2970;
            }
          } while (!bool1);
          localObject8 = (a.c.bb)this.q.get(localObject6);
          localObject9 = (a.c.bb)this.q.get(localObject4);
        } while (bool2);
        if ((bool2) || (localObject8 != null))
        {
          localObject10 = ((a.c.bb)localObject8).l();
          do
          {
            if (!((w)localObject10).e()) {
              break;
            }
            if (bool2) {
              break label2941;
            }
            localObject11 = ((w)localObject10).d();
            ((a.c.bb)localObject9).add(localObject11);
            this.s.a(localObject11, localObject4);
            ((w)localObject10).f();
            if (bool1) {
              break label2939;
            }
          } while (!bool1);
        }
        if ((!bool2) && (!bool2)) {
          if (localObject6 == this.d) {
            this.d = ((e)localObject4);
          }
        }
        if (localObject6 == this.c) {
          this.c = ((e)localObject4);
        }
        this.n.a((e)localObject6);
        ((a.c.y)localObject3).f();
      } while (!bool1);
    }
    label2337:
    label2526:
    return;
  }
  
  private e a(e parame)
  {
    boolean bool = d.R;
    if (!bool) {
      if (parame == null) {
        return null;
      }
    }
    e locale = (e)this.s.get(parame);
    if (!bool) {
      if (locale == null)
      {
        locale = this.n.i();
        this.s.a(parame, locale);
        a.c.bb localbb = new a.c.bb();
        localbb.add(parame);
        this.q.a(locale, localbb);
      }
    }
    return locale;
  }
  
  static class b_
  {
    e a;
    fb c;
    
    b_(e parame, fb paramfb)
    {
      this.a = parame;
      this.c = paramfb;
    }
    
    byte a()
    {
      return this.c.c();
    }
    
    int c()
    {
      return this.c.a();
    }
  }
  
  static final class c_
    implements Comparator
  {
    private k a;
    
    c_(k paramk)
    {
      this.a = paramk;
    }
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      boolean bool = d.R;
      int i = this.a.getInt(paramObject1);
      int j = this.a.getInt(paramObject2);
      if (!bool)
      {
        if (i > j) {
          return -1;
        }
        if (bool) {}
      }
      else if (i < j)
      {
        return 1;
      }
      return 0;
    }
  }
  
  static final class a_
    implements Comparator
  {
    public int compare(Object paramObject1, Object paramObject2)
    {
      boolean bool = d.R;
      o.b_ localb_1 = (o.b_)paramObject1;
      o.b_ localb_2 = (o.b_)paramObject2;
      if (!bool)
      {
        if (localb_1.c() > localb_2.c()) {
          return -1;
        }
        if (bool) {}
      }
      else if (localb_1.c() < localb_2.c())
      {
        return 1;
      }
      return 0;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.d.a.o

 * JD-Core Version:    0.7.0.1

 */